import request from '@/utils/request'
import { encryptionData } from '@/utils/com'
import Qs from 'qs'
/* 消息通知 删除*/
export function deleteNotice(data) {
  return request({
    url: '/jcdSys/jcdHelpNotice/deleteNotice',
    method: 'DELETE',
    headers: encryptionData(data, '/jcdHelpNotice/deleteNotice'),
    data: Qs.stringify(data)
  })
}
/* 会员日志保存接口*/
export function jcdStoreLogSave(data) {
  return request({
    url: '/jcdGys/jcdStoreLog/save',
    method: 'post',
    headers: encryptionData(data, '/jcdStoreLog/save'),
    data: Qs.stringify(data)
  })
}
/* 会员日志分页接口 */
export function jcdStoreLogPage(data) {
  return request({
    url: '/jcdGys/jcdStoreLog/page',
    method: 'get',
    headers: encryptionData(data, '/jcdStoreLog/page'),
    params: data
  })
}
/* 收益明细分页列表 */
export function incomePage(data) {
  return request({
    url: '/jcdSys/jcdUserIncome/incomePage',
    method: 'get',
    headers: encryptionData(data, '/jcdUserIncome/incomePage'),
    params: data
  })
}
/* 会员钱包 */
export function sysAccountPage(data) {
  return request({
    url: '/jcdSys/sysAccount/page',
    method: 'get',
    headers: encryptionData(data, '/jcdSys/sysAccount/page'),
    params: data
  })
}
export function comStorestatistics(data) {
  return request({
    url: '/jcdGys/comStore/statistics',
    method: 'get',
    headers: encryptionData(data, '/jcdGys/comStore/statistics'),
    params: data
  })
}
/* 提现记录分页查询 */
export function withdrawPage(data) {
  return request({
    url: '/jcdSys/jcdWithdrawRecord/withdrawPage',
    method: 'get',
    headers: encryptionData(data, '//jcdWithdrawRecord/withdrawPage'),
    params: data
  })
}
/* 会员信息补全身份证正反面*/
export function comWorkerupdate(data) {
  return request({
    url: '/jcdGys/comWorker/update',
    method: 'put',
    headers: encryptionData(data, '/comWorker/update'),
    data: Qs.stringify(data)
  })
}
/* 发布消息通知*/
export function publishNotice(data) {
  return request({
    url: '/jcdSys/jcdHelpNotice/publishNotice',
    method: 'post',
    headers: encryptionData(data, '/jcdHelpNotice/publishNotice'),
    data: Qs.stringify(data)
  })
}
/* 消息通知*/
export function addNotice(data) {
  return request({
    url: '/jcdSys/jcdHelpNotice/addNotice',
    method: 'post',
    headers: encryptionData(data, '/jcdHelpNotice/addNotice'),
    data: Qs.stringify(data)
  })
}
/* 消息通知*/
export function pageNotice(data) {
  return request({
    url: '/jcdSys/jcdHelpNotice/pageNotice',
    method: 'post',
    headers: encryptionData(data, '/jcdHelpNotice/pageNotice'),
    data: Qs.stringify(data)
  })
}
/* 会员等级保存或修改接口*/
export function saveOrUpdate(data) {
  return request({
    url: '/jcdGys/jcdMemberLevel/saveOrUpdate',
    method: 'post',
    headers: encryptionData(data, '/jcdMemberLevel/saveOrUpdate'),
    data: Qs.stringify(data)
  })
}
/* 会员等级分页查询接口*/
export function jcdMemberLevel(data) {
  return request({
    url: '/jcdGys/jcdMemberLevel/page',
    method: 'get',
    headers: encryptionData(data, '/jcdMemberLevel/page'),
    params: data
  })
}
/* 注册会员-列表 */
export function getRegisterList(data) {
  return request({
    url: '/jcdGys/register/registerList',
    method: 'get',
    headers: encryptionData(data, '/register/registerList'),
    params: data
  })
}
export function registerpage(data) {
  return request({
    url: 'jcdGys/register/page',
    method: 'get',
    headers: encryptionData(data, '/register/page'),
    params: data
  })
}

/* 注册会员-删除 */
export function deleteRegister(id) {
  return request({
    url: `/jcdGys/register/delete/${id}`,
    method: 'DELETE',
    headers: encryptionData({}, `/register/delete/${id}`),
  })
}
/* 注册会员-详情 */
export function getRegisterDetail(data) {
  return request({
    url: '/jcdGys/getRegisterDetail',
    method: 'get',
    headers: encryptionData(data, '/getRegisterDetail'),
    params: data
  })
}

/* 注册会员-审核 */
export function auditRegister(data) {
  return request({
    url: '/jcdGys/register/audit',
    method: 'put',
    headers: encryptionData(data, '/register/audit'),
    data: Qs.stringify(data)
  })
}
/* 会员-审核 */
export function authRegister(data) {
  return request({
    url: '/jcdGys/register/auth',
    method: 'put',
    headers: encryptionData(data, '/register/auth'),
    data: Qs.stringify(data)
  })
}

/* 会员信息-分站数据 */
export function getGroupList(data) {
  return request({
    url: '/jcdGys/comStore/findCitySubstationData',
    method: 'get',
    headers: encryptionData(data, '/comStore/findCitySubstationData'),
    params: data
  })
}

/* 会员信息-列表 */
export function getMemberList(data) {
  return request({
    url: '/jcdGys/comStore/page',
    method: 'get',
    headers: encryptionData(data, '/comStore/page'),
    params: data
  })
}

/* 会员信息-修改分站 */
export function setMemberGroup(data) {
  return request({
    url: '/jcdGys/comStore/updateCitySubstation',
    method: 'post',
    headers: encryptionData(data, '/comStore/updateCitySubstation'),
    data: Qs.stringify(data)
  })
}


/* 会员信息-关闭 */
export function closeVip(data) {
  return request({
    url: '/jcdGys/comStore/closeVip',
    method: 'post',
    headers: encryptionData(data, '/comStore/closeVip'),
    data: Qs.stringify(data)
  })
}

/* 会员信息-激活 */
export function openVip(data) {
  return request({
    url: '/jcdGys/comStore/openVip',
    method: 'post',
    headers: encryptionData(data, '/comStore/openVip'),
    data: Qs.stringify(data)
  })
}

/* 会员信息-删除 */
export function delMember(data) {
  return request({
    url: `/jcdGys/comStore/delete`,
    method: 'DELETE',
    headers: encryptionData(data, `/comStore/delete`),
    data: Qs.stringify(data)
  })
}


/* 会员信息-修改时间 */
export function setVipTime(data) {
  return request({
    url: '/jcdGys/comStore/editVipTime',
    method: 'post',
    headers: encryptionData(data, '/comStore/editVipTime'),
    data: Qs.stringify(data)
  })
}

/* 会员信息-获取详情 */
export function getMemberDetail(data) {
  return request({
    url: '/jcdGys/comStore/getInfo',
    method: 'get',
    headers: encryptionData(data, '/comStore/getInfo'),
    params: data
  })
}

/* 会员缴费活动-列表 */
export function getActivityList(data) {
  return request({
    url: '/jcdSys/jcdVipActivity/list',
    method: 'get',
    headers: encryptionData(data, '/jcdVipActivity/list'),
    params: data
  })
}

/* 会员缴费活动-详情 */
export function getActivityDetail(data) {
  return request({
    url: '/jcdSys/jcdVipActivity/get',
    method: 'get',
    headers: encryptionData(data, '/jcdVipActivity/get'),
    params: data
  })
}

/* 会员缴费活动-添加 */
export function saveActivity(data) {
  return request({
    url: '/jcdSys/jcdVipActivity/save',
    method: 'post',
    headers: encryptionData(data, '/jcdVipActivity/save'),
    data: Qs.stringify(data)
  })
}

/* 会员缴费活动-修改活动状态 */
export function updActivityStatus(data) {
  return request({
    url: '/jcdSys/jcdVipActivity/changeStatus',
    method: 'post',
    headers: encryptionData(data, '/jcdVipActivity/changeStatus'),
    data: Qs.stringify(data)
  })
}

/* 会员缴费活动-删除 */
export function delActivity(data) {
  return request({
    url: '/jcdSys/jcdVipActivity/delete',
    method: 'DELETE',
    headers: encryptionData(data, '/jcdVipActivity/delete'),
    data: Qs.stringify(data)
  })
}

/* 返点统计-列表 */
export function getRebateList(data) {
  return request({
    url: '/jcdSys/jcdStoreGmvRebate/statistics',
    method: 'get',
    headers: encryptionData(data, '/jcdStoreGmvRebate/statistics'),
    params: data
  })
}

/* 返点统计-标记已返 */
export function setRebate(data) {
  return request({
    url: '/jcdSys/jcdStoreGmvRebate/markRebateByStoreId',
    method: 'post',
    headers: encryptionData(data, '/jcdStoreGmvRebate/markRebateByStoreId'),
    data: Qs.stringify(data)
  })
}

/* 返点系数-列表 */
export function getRebateRatioList(data) {
  return request({
    url: '/jcdSys/jcdStoreGmvRebate/list',
    method: 'get',
    headers: encryptionData(data, '/jcdStoreGmvRebate/list'),
    params: data
  })
}

/* 返点系数-添加 */
export function saveRebateRatio(data) {
  return request({
    url: '/jcdSys/jcdStoreGmvRebate/save',
    method: 'post',
    headers: encryptionData(data, '/jcdStoreGmvRebate/save'),
    data: Qs.stringify(data)
  })
}

/* 返点系数-删除 */
export function delRebateRatio(data) {
  return request({
    url: '/jcdSys/jcdStoreGmvRebate/delete',
    method: 'DELETE',
    headers: encryptionData(data, '/jcdStoreGmvRebate/delete'),
    data: Qs.stringify(data)
  })
}

/* 会员信息-开通vip */
export function setOpenVip(data) {
  return request({
    url: '/jcdGys/yzbVip/activeVip',
    method: 'post',
    headers: encryptionData(data, '/yzbVip/activeVip'),
    data: Qs.stringify(data)
  })
}
